Dialog Box Element Positioning

Hi Guys,

I'm just starting dxl, and I'm confused on positioning elements in the dialog Box.

The following code

theTab->"right"->"form" 


theFrame->"left"->"inside"->theTab 
->"top"->"spaced"->  Where can I get a list of all the keywords following -> for different type of element?

Is there a link or somewhere in the DXL manual that lists all the keyword?(By keywords I mean "Left", "inside", "spaced"..etc)

 

Thanks guys for support!

 


zhangw - Wed Nov 06 15:38:52 EST 2013

Re: Dialog Box Element Positioning
GregM_dxler - Thu Nov 07 09:02:46 EST 2013

In the dxl reference manual, look under Contrained placement.  This provides you with most of the list, spaced, flush, unattached, aligned and inside.  You might also look at the simple placement.

Dialog box placement is tricky and it doesn't always do what you think it should do.  Takes practice.

Hope this helps,

Greg

Re: Dialog Box Element Positioning
sekrbo - Thu Nov 07 09:12:16 EST 2013

From the manual:

 

Attachment placement
The -> operator is used in constrained placement, as shown in the following syntax:

DBE elem -> string side -> string attachment [-> DBE other]
where:

elem- Is a dialog box element of type DBE. 
side- Is the side the attachment is on: left, right, top or bottom (these are not case sensitive). 
attachment- Is the type of attachment: flush, spaced, aligned, unattached, inside or form (these are not case sensitive). 
other- Is the dialog box element of type DBE that is the one relative to which placement is to be performed. 


The three operators together make a complete specification for the attachment.

Re: Dialog Box Element Positioning
zhangw - Thu Nov 07 09:34:16 EST 2013

Thanks guys i found both( attachment&Constrained) very useful!

Re: Dialog Box Element Positioning
llandale - Thu Nov 07 10:44:55 EST 2013

GregM_dxler - Thu Nov 07 09:02:46 EST 2013

In the dxl reference manual, look under Contrained placement.  This provides you with most of the list, spaced, flush, unattached, aligned and inside.  You might also look at the simple placement.

Dialog box placement is tricky and it doesn't always do what you think it should do.  Takes practice.

Hope this helps,

Greg

Yup, I've written 100s of dialogs and NEVER got one placed correctly the 1st time.  I have found that diligently thinking and coding from left-to-right and top-down helps considerably.  For big dialogs with frames and tabs, I just go ahead and have multiple functions to conceptualize it.  For example

  • CreateFrame_1()
  • {  put top-left DBE in frame
  •     posiution additional framed DBEs relative to 1st one
  • }
  • Main:
  • {  create dialog
  •     CreateFrame_1
  •     CreateFrame_2
  •     position Frame_2 below Frame_1
  • }

Some high powered folks here may scoff at that since they can handle scores of variables in their heads at one time; but I cannot.

Some tricky dialogs require hokey invisible DBEs to finalize the attachments.  There are time B relative to A won't work; B relative to invisible H relative to A does.

-Louie